{% extends "base.html" %}

{% block title %} {{ block.super }} - User Stats {% endblock %}

{% block content %} 
	<h1> {{object.username }}</h1><p>
	Full Name : {{ object.first_name }}, {{ object.last_name }}<p>
	Score : {{ object.userprofile.score }}<p>
	<a href="/opc/submits/last10/{{object.username}}/"> View Last Submissions </a>

	<table border='1'>
			<tr>
				<th> Problem </th>
				<th> Score </th>
			</tr>
		{% for prob in object.userprofile.solved.all %}
			<tr>
				<td> <a href="/opc/problems/{{ prob.question.id }}"> {{ prob.question.name }}	</a></td>
				<td> {{ prob.question.score }} </td>
			</tr>
		{% endfor %}
	</table>
{% endblock %}
